const _regs = {
  isPhone: /^1[3456789]\d{9}$/,
  isCode: /^\d{6}$/,
  isNone: /.+/,
};
export const regs = Object.keys(_regs).reduce(
  (req, key: keyof typeof _regs) => {
    req[key] = (text: string) => _regs[key].test(text);
    return req;
  },
  {} as {
    [K in keyof typeof _regs]: (text: string) => boolean;
  },
);
